package com.heima.mapper;

import com.github.pagehelper.Page;
import com.heima.pojo.dto.SkuClassDTO;
import com.heima.pojo.entity.SkuClass;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SkuClassMapper {
    @Insert("insert into tb_sku_class (class_name)values (#{className})")
    int insertSku(SkuClass skuClass);


    Page<SkuClass> page(SkuClassDTO dto);

    @Select("select class_id,class_name from tb_sku_class where class_id=#{classId}")
    SkuClass selectById(Integer classId);


    int update(SkuClass skuClass);

    @Delete("delete from tb_sku_class where class_id=#{classId}")
    int delete(int parseInt);
}
